\hypertarget{class____Cellgroup}{}\section{\+\_\+\+\_\+\+Cellgroup Class Reference}
\label{class____Cellgroup}\index{\+\_\+\+\_\+\+Cellgroup@{\+\_\+\+\_\+\+Cellgroup}}


网格二维数组群，来表征一个box内的cell信息，cell是其内部的member  




{\ttfamily \#include $<$cellinf.\+h$>$}



Collaboration diagram for \+\_\+\+\_\+\+Cellgroup\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{d5/d8c/class____Cellgroup__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class____Cellgroup_afb3bb7b6b39411f2434a978fef00d481}{}{\bfseries \+\_\+\+\_\+\+Cellgroup} (const \hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ long $>$ \&\hyperlink{class____Cellgroup_a5cc95e62e220546295a5a362f06711aa}{xygridmin}, const \hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ long $>$ \&\hyperlink{class____Cellgroup_aed6b25f55f7b3c5a016a918ff1a6639d}{xygridmax}, const \hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ double $>$ \&\hyperlink{class____Cellgroup_ae20e3630922457ba24a6bcb684d05554}{xymin}, const \hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ double $>$ \&\hyperlink{class____Cellgroup_a2b80f1171533c5123df5df305060f30b}{xymax}, \hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ long $>$ \&\hyperlink{class____Cellgroup_a5782a1f9bb3ea603dd825bddd38591b0}{cellnum}, const int \&\hyperlink{class____Cellgroup_a474b55ce6aa24ae4923a689fce84502e}{species}, const vector$<$ int $>$ \&\hyperlink{class____Cellgroup_ae6e024926296cf7c14c030313c0bc821}{ppc}, const vector$<$ \hyperlink{structParticles}{Particles} $>$ \&\hyperlink{class____Cellgroup_a7b9c40c31ce78a0c1b1a0121a3607499}{spptcl}, const double \&\hyperlink{class____Cellgroup_a5ec9eb1fda44296bfea67b7c7a3ccf5c}{delta\+\_\+t}, const \hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ int $>$ \hyperlink{class____Cellgroup_a9aeb92258293494445bd29c98f42fc0e}{position}, const long \&\hyperlink{class____Cellgroup_a8ca9bc2c9859e8d090e73879686f7416}{maxid})\label{class____Cellgroup_afb3bb7b6b39411f2434a978fef00d481}

\item 
\hypertarget{class____Cellgroup_a74ac01c3bfd861e6189bd4897d87749e}{}{\bfseries \+\_\+\+\_\+\+Cellgroup} (const \hyperlink{class____Cellgroup}{\+\_\+\+\_\+\+Cellgroup} \&other)\label{class____Cellgroup_a74ac01c3bfd861e6189bd4897d87749e}

\item 
\hypertarget{class____Cellgroup_a7680b79ade62ab3db1407cb05139b644}{}void \hyperlink{class____Cellgroup_a7680b79ade62ab3db1407cb05139b644}{init} ()\label{class____Cellgroup_a7680b79ade62ab3db1407cb05139b644}

\begin{DoxyCompactList}\small\item\em 初始化，创建cell，没有粒子 \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_aac8bd4f9cc5b2d92fcf56d67b437a772}{}void \hyperlink{class____Cellgroup_aac8bd4f9cc5b2d92fcf56d67b437a772}{squeeze} ()\label{class____Cellgroup_aac8bd4f9cc5b2d92fcf56d67b437a772}

\begin{DoxyCompactList}\small\item\em 压缩当前box的空间 \end{DoxyCompactList}\item 
void \hyperlink{class____Cellgroup_a973897fe55bc34fcfa4cf4ddcc35c155}{weight\+\_\+to\+\_\+grid} (const int \&myrank)
\begin{DoxyCompactList}\small\item\em 将粒子密度和电流密度插值到网格 \end{DoxyCompactList}\item 
void \hyperlink{class____Cellgroup_a71c47813c198aca79375c761460020d5}{weight\+\_\+to\+\_\+gridb} ()
\item 
\hypertarget{class____Cellgroup_a28dd0225f48a179ea3f6f3dd761256f0}{}void {\bfseries weight\+\_\+to\+\_\+gridc} ()\label{class____Cellgroup_a28dd0225f48a179ea3f6f3dd761256f0}

\item 
\hypertarget{class____Cellgroup_ab61f8a5cd10490962af1ae537bf25953}{}void \hyperlink{class____Cellgroup_ab61f8a5cd10490962af1ae537bf25953}{weight\+\_\+to\+\_\+ptcls} ()\label{class____Cellgroup_ab61f8a5cd10490962af1ae537bf25953}

\begin{DoxyCompactList}\small\item\em 将场数据插值到粒子 \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_adb393ef518c9a3f24bc25bbfb485a232}{}void \hyperlink{class____Cellgroup_adb393ef518c9a3f24bc25bbfb485a232}{set\+\_\+velocity} (const int \&sp, const \hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ long $>$ \&\hyperlink{class____Cellgroup_a9aeb92258293494445bd29c98f42fc0e}{position}, const \hyperlink{class____Vect3}{\+\_\+\+\_\+\+Vect3}$<$ double $>$ \&velocity)\label{class____Cellgroup_adb393ef518c9a3f24bc25bbfb485a232}

\begin{DoxyCompactList}\small\item\em 设置网格位置position处sp类粒子的速度 \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_a59f820535e43b7dcd652ac31cd2073ee}{}void \hyperlink{class____Cellgroup_a59f820535e43b7dcd652ac31cd2073ee}{set\+\_\+sp\+\_\+velocity} (const int \&sp, const \hyperlink{class____Vect3}{\+\_\+\+\_\+\+Vect3}$<$ double $>$ \&velocity)\label{class____Cellgroup_a59f820535e43b7dcd652ac31cd2073ee}

\begin{DoxyCompactList}\small\item\em 设置当前box内sp类粒子的速度 \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_a32e447c440b6606e16ca99973a7cab81}{}void \hyperlink{class____Cellgroup_a32e447c440b6606e16ca99973a7cab81}{init\+\_\+ptcls} ()\label{class____Cellgroup_a32e447c440b6606e16ca99973a7cab81}

\begin{DoxyCompactList}\small\item\em 初始化当前box内的粒子 \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_af9f8f21aed7bd93582a553b633e27163}{}void \hyperlink{class____Cellgroup_af9f8f21aed7bd93582a553b633e27163}{advance} (const double \&\hyperlink{class____Cellgroup_a5ec9eb1fda44296bfea67b7c7a3ccf5c}{delta\+\_\+t}, vector$<$ vector$<$ \hyperlink{class____Ptcls}{\+\_\+\+\_\+\+Ptcls} $>$ $>$ \&templist, const int \&myrank, const int \&n)\label{class____Cellgroup_af9f8f21aed7bd93582a553b633e27163}

\begin{DoxyCompactList}\small\item\em 推动当前cellgroup内粒子运动 \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_a8a8311645eefd1e6f3a5ca3833b5b1ec}{}void \hyperlink{class____Cellgroup_a8a8311645eefd1e6f3a5ca3833b5b1ec}{dump} (const int \&rank, const int \&n, string fname, const int \&sp)\label{class____Cellgroup_a8a8311645eefd1e6f3a5ca3833b5b1ec}

\begin{DoxyCompactList}\small\item\em 输出当前进程rank，当前步n，文件名前缀fname，数据类型sp到文件 \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_ac3ab0152b8f4de0938a168e0a88021f9}{}void {\bfseries dump\+\_\+ptcls} (const int \&rank, const int \&n, string fname, const int \&sp)\label{class____Cellgroup_ac3ab0152b8f4de0938a168e0a88021f9}

\item 
\hypertarget{class____Cellgroup_ab9df1ed9d6dd6df19b0cc2ce79e4b9c7}{}void \hyperlink{class____Cellgroup_ab9df1ed9d6dd6df19b0cc2ce79e4b9c7}{clear\+\_\+rhoj} ()\label{class____Cellgroup_ab9df1ed9d6dd6df19b0cc2ce79e4b9c7}

\begin{DoxyCompactList}\small\item\em 将rho, j field 清０ \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_a98f66d26cc48c583d11ec6cd41f923fe}{}void \hyperlink{class____Cellgroup_a98f66d26cc48c583d11ec6cd41f923fe}{merge\+\_\+ptcls} (const int \&max\+\_\+ppc, const double \&delta\+\_\+e, const double \&delta\+\_\+v, const int \&sp)\label{class____Cellgroup_a98f66d26cc48c583d11ec6cd41f923fe}

\begin{DoxyCompactList}\small\item\em 合并粒子 \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_ab2badc9b1cf59d42c5ba2585e70b156b}{}void {\bfseries set\+\_\+bd} (int bd\+\_\+types\mbox{[}$\,$\mbox{]})\label{class____Cellgroup_ab2badc9b1cf59d42c5ba2585e70b156b}

\end{DoxyCompactItemize}
\subsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class____Cellgroup_a5cc95e62e220546295a5a362f06711aa}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ long $>$ \hyperlink{class____Cellgroup_a5cc95e62e220546295a5a362f06711aa}{xygridmin}\label{class____Cellgroup_a5cc95e62e220546295a5a362f06711aa}

\begin{DoxyCompactList}\small\item\em 当前group的gridmin \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_aed6b25f55f7b3c5a016a918ff1a6639d}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ long $>$ \hyperlink{class____Cellgroup_aed6b25f55f7b3c5a016a918ff1a6639d}{xygridmax}\label{class____Cellgroup_aed6b25f55f7b3c5a016a918ff1a6639d}

\begin{DoxyCompactList}\small\item\em 当前group的gridmax \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_a8ca9bc2c9859e8d090e73879686f7416}{}long \hyperlink{class____Cellgroup_a8ca9bc2c9859e8d090e73879686f7416}{maxid}\label{class____Cellgroup_a8ca9bc2c9859e8d090e73879686f7416}

\begin{DoxyCompactList}\small\item\em maxid current for ptcls \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_ae20e3630922457ba24a6bcb684d05554}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ double $>$ \hyperlink{class____Cellgroup_ae20e3630922457ba24a6bcb684d05554}{xymin}\label{class____Cellgroup_ae20e3630922457ba24a6bcb684d05554}

\begin{DoxyCompactList}\small\item\em 当前group的xymin,左下角坐标 \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_a2b80f1171533c5123df5df305060f30b}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ double $>$ \hyperlink{class____Cellgroup_a2b80f1171533c5123df5df305060f30b}{xymax}\label{class____Cellgroup_a2b80f1171533c5123df5df305060f30b}

\begin{DoxyCompactList}\small\item\em 当前group的xymax，右上角坐标 \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_a5782a1f9bb3ea603dd825bddd38591b0}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ long $>$ \hyperlink{class____Cellgroup_a5782a1f9bb3ea603dd825bddd38591b0}{cellnum}\label{class____Cellgroup_a5782a1f9bb3ea603dd825bddd38591b0}

\begin{DoxyCompactList}\small\item\em 当前group的cell num，在x 和 y 方向 \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_ab274fc4e15d1ff0cb87e7bf0b46f4431}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ double $>$ \hyperlink{class____Cellgroup_ab274fc4e15d1ff0cb87e7bf0b46f4431}{dxy}\label{class____Cellgroup_ab274fc4e15d1ff0cb87e7bf0b46f4431}

\begin{DoxyCompactList}\small\item\em 当前group的cell宽度，dx 和 dy \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_a7b9c40c31ce78a0c1b1a0121a3607499}{}vector$<$ \hyperlink{structParticles}{Particles} $>$ \hyperlink{class____Cellgroup_a7b9c40c31ce78a0c1b1a0121a3607499}{spptcl}\label{class____Cellgroup_a7b9c40c31ce78a0c1b1a0121a3607499}

\begin{DoxyCompactList}\small\item\em species 是否启用 \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_a474b55ce6aa24ae4923a689fce84502e}{}int \hyperlink{class____Cellgroup_a474b55ce6aa24ae4923a689fce84502e}{species}\label{class____Cellgroup_a474b55ce6aa24ae4923a689fce84502e}

\begin{DoxyCompactList}\small\item\em species total \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_ae6e024926296cf7c14c030313c0bc821}{}vector$<$ int $>$ \hyperlink{class____Cellgroup_ae6e024926296cf7c14c030313c0bc821}{ppc}\label{class____Cellgroup_ae6e024926296cf7c14c030313c0bc821}

\begin{DoxyCompactList}\small\item\em species 的 particle per cell \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_a3154a9e77e168377fade699c2ee08bb3}{}int \hyperlink{class____Cellgroup_a3154a9e77e168377fade699c2ee08bb3}{disable\+\_\+em} = 0\label{class____Cellgroup_a3154a9e77e168377fade699c2ee08bb3}

\begin{DoxyCompactList}\small\item\em 是否关闭em \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_a71c254ff80e49d94d771dbc792d8d2e9}{}int \hyperlink{class____Cellgroup_a71c254ff80e49d94d771dbc792d8d2e9}{bd\+\_\+type} \mbox{[}4\mbox{]}\label{class____Cellgroup_a71c254ff80e49d94d771dbc792d8d2e9}

\begin{DoxyCompactList}\small\item\em bd\+\_\+type \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_a5ec9eb1fda44296bfea67b7c7a3ccf5c}{}double \hyperlink{class____Cellgroup_a5ec9eb1fda44296bfea67b7c7a3ccf5c}{delta\+\_\+t}\label{class____Cellgroup_a5ec9eb1fda44296bfea67b7c7a3ccf5c}

\begin{DoxyCompactList}\small\item\em dt \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_a9aeb92258293494445bd29c98f42fc0e}{}\hyperlink{class____Vect2}{\+\_\+\+\_\+\+Vect2}$<$ int $>$ \hyperlink{class____Cellgroup_a9aeb92258293494445bd29c98f42fc0e}{position}\label{class____Cellgroup_a9aeb92258293494445bd29c98f42fc0e}

\begin{DoxyCompactList}\small\item\em 这个位置用来记录在\+M\+P\+I中的位置 \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_aa2e1725d6a24ff12ccdc236d55682a73}{}vector$<$ vector$<$ \hyperlink{class____Cellinfo}{\+\_\+\+\_\+\+Cellinfo} $>$ $>$ \hyperlink{class____Cellgroup_aa2e1725d6a24ff12ccdc236d55682a73}{member}\label{class____Cellgroup_aa2e1725d6a24ff12ccdc236d55682a73}

\begin{DoxyCompactList}\small\item\em cellinfo 数据 \end{DoxyCompactList}\item 
\hypertarget{class____Cellgroup_a2bea15957c1f035a3803f7b32303f79a}{}vector$<$ vector$<$ \hyperlink{class____Vect3}{\+\_\+\+\_\+\+Vect3}$<$ double $>$ $>$ $>$ {\bfseries jfield}\label{class____Cellgroup_a2bea15957c1f035a3803f7b32303f79a}

\item 
\hypertarget{class____Cellgroup_a7d60577b2279353dd3de45abb794e35a}{}vector$<$ vector$<$ double $>$ $>$ {\bfseries rhofield}\label{class____Cellgroup_a7d60577b2279353dd3de45abb794e35a}

\item 
\hypertarget{class____Cellgroup_adc5caa91eab8d6a9dc0bae5b7a8d315b}{}vector$<$ vector$<$ vector$<$ double $>$ $>$ $>$ {\bfseries density\+\_\+grid}\label{class____Cellgroup_adc5caa91eab8d6a9dc0bae5b7a8d315b}

\item 
\hypertarget{class____Cellgroup_a53aca294ec6375d224fd8340422228d1}{}vector$<$ vector$<$ vector$<$ double $>$ $>$ $>$ {\bfseries energy\+\_\+grid}\label{class____Cellgroup_a53aca294ec6375d224fd8340422228d1}

\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class____Cellgroup_a2cf48aa3d5761fa1d3460997af22e3fc}{}void \hyperlink{class____Cellgroup_a2cf48aa3d5761fa1d3460997af22e3fc}{monte\+\_\+carlo} (\hyperlink{class____Cellfield}{\+\_\+\+\_\+\+Cellfield} \&mygroup, const int \&type, const double \&\hyperlink{class____Cellgroup_a5ec9eb1fda44296bfea67b7c7a3ccf5c}{delta\+\_\+t}, vector$<$ vector$<$ double $>$ $>$ \&tables1d, vector$<$ vector$<$ vector$<$ double $>$ $>$ $>$ \&tables2d)\label{class____Cellgroup_a2cf48aa3d5761fa1d3460997af22e3fc}

\begin{DoxyCompactList}\small\item\em 使用这个函数来产生事件, 其实只是设置了events\+\_\+type变量，过程在cell中进行, 0\+: synchrotron radiation 1\+: bremsstrahlung radiation, 2\+: Breit\+\_\+\+Wheeler pair, 3\+: Bethe-\/\+Hetiler pair \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
网格二维数组群，来表征一个box内的cell信息，cell是其内部的member 

\subsection{Member Function Documentation}
\hypertarget{class____Cellgroup_a973897fe55bc34fcfa4cf4ddcc35c155}{}\index{\+\_\+\+\_\+\+Cellgroup@{\+\_\+\+\_\+\+Cellgroup}!weight\+\_\+to\+\_\+grid@{weight\+\_\+to\+\_\+grid}}
\index{weight\+\_\+to\+\_\+grid@{weight\+\_\+to\+\_\+grid}!\+\_\+\+\_\+\+Cellgroup@{\+\_\+\+\_\+\+Cellgroup}}
\subsubsection[{weight\+\_\+to\+\_\+grid}]{\setlength{\rightskip}{0pt plus 5cm}void \+\_\+\+\_\+\+Cellgroup\+::weight\+\_\+to\+\_\+grid (
\begin{DoxyParamCaption}
\item[{const int \&}]{myrank}
\end{DoxyParamCaption}
)}\label{class____Cellgroup_a973897fe55bc34fcfa4cf4ddcc35c155}


将粒子密度和电流密度插值到网格 

保存临时单个粒子的贡献

对相邻的三个cell中的场进行插值到粒子 这里采用相对坐标local

两个是坐标是粒子最近格点，另一个是第一次的格点

相邻的3个个点，xy方向都可能有影响 \hypertarget{class____Cellgroup_a71c47813c198aca79375c761460020d5}{}\index{\+\_\+\+\_\+\+Cellgroup@{\+\_\+\+\_\+\+Cellgroup}!weight\+\_\+to\+\_\+gridb@{weight\+\_\+to\+\_\+gridb}}
\index{weight\+\_\+to\+\_\+gridb@{weight\+\_\+to\+\_\+gridb}!\+\_\+\+\_\+\+Cellgroup@{\+\_\+\+\_\+\+Cellgroup}}
\subsubsection[{weight\+\_\+to\+\_\+gridb}]{\setlength{\rightskip}{0pt plus 5cm}void \+\_\+\+\_\+\+Cellgroup\+::weight\+\_\+to\+\_\+gridb (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{class____Cellgroup_a71c47813c198aca79375c761460020d5}
对相邻的三个cell中的场进行插值到粒子 这里采用相对坐标local 

The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
cellinf.\+h\end{DoxyCompactItemize}
